<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['数据统计','停车管理','停车数据统计']" icon="fa fa-area-chart" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>停车数据统计</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<div class="top_module">
									<span class="module_text">公司名称</span>
									<div class="company_tree" style="display: inline-block;vertical-align: middle;">
										<div class="clearfix" style="position: relative;">
											<div class="s_hover_box s_fix_radius">
												<input class="form-control tree_company_input" id="company" name="selectedCompanyName" (input)="companySearch()" autocomplete="off" [(ngModel)]='selectedCompanyName' (click)="companyClick()" type="text" placeholder="请选择或输入关键字" />
												<div class="s_del_icon" (click)='delText()'>x</div>
											</div>
											<div class="s_tree_box" id="tree_box">
												<div class="vision_tree" id="vision_tree">
													<div id="tree"></div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="top_module">
									<span class="module_text">车牌号</span>
									<div class="s_hover_box">
										<select class="select2" id="carNumberSelect2">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='del_carNumber()'>x</div>
									</div>
								</div>

								<div class="top_module">
									<span class="module_text">设备ID</span>
									<input class="module_inp" type="text" style="padding-left: 12px;" [(ngModel)]="deviceId" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" placeholder=" 选择或输入编号..." />
								</div>

								<div class="selectDate top_module">
									<div class="input-daterange input-group s_selected_time_box s_hover_box">
										<input type="text" [(ngModel)]='startTime' class="form-control s_selected_time" id="datetimepicker1"  autocomplete="off" placeholder="选择开始时间"/>
										<span class="s_selected_time_spe">至</span>
										<input type="text" [(ngModel)]='endTime' class="form-control s_selected_time" id="datetimepicker2"  autocomplete="off" placeholder="选择结束时间"/>
										<div class="s_del_icon" (click)='del_date()'>x</div>
									</div>
								</div>


								<div class="top_module">
									<span class="module_text">最小停车时间</span>
									<input class="module_inp" type="text" style="padding-left: 12px;" [(ngModel)]="minStopTime" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" placeholder="输入最小停车时间..." />
								</div>

								<button type="button" class="btn btn-primary" (click)="search_data()">查询</button>
								<button type="button" class="btn btn-primary" (click)="add_row()">添加</button>
							</div>

						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>车牌号</th>
										<th>停车起始时间</th>
										<th>停车结束时间</th>
										<th>总停车时间</th>
										<th>经度</th>
										<th>纬度</th>
										<th>停车地点</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData">
										<td>{{row.carNumber}}</td>
										<td>{{row.startTime}}</td>
										<td>{{row.endTime}}</td>
										<td>{{row.totalTime}}</td>
										<td>{{row.x}}</td>
										<td>{{row.y}}</td>
										<td>{{row.parkingPlace}}</td>
										<td>
											<button type="button" (click)="updataEvent(row)">编辑</button>
											<button type="button" (click)="delEvent(row)">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
</div>